package com.wy.service.impl.wy;

import com.wy.bean.ParkingBean;
import com.wy.dao.ParkingMapper;
import com.wy.model.sys.ParkingEntity;
import com.wy.service.wy.ParkingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("parkingServiceImpl")
public class ParkingServiceImpl implements ParkingService{
    @Autowired
    private ParkingMapper parkingMapper;
    @Override
    public void insertParking(ParkingEntity parkingEntity) {
        parkingMapper.insert(parkingEntity);
    }

    @Override
    public void deleteParking(List<String> groupId) {
        parkingMapper.deleteByPrimaryKeys(groupId);
    }

    @Override
    public void updateParking(ParkingEntity parkingEntity) {
        parkingMapper.updateByPrimaryKey(parkingEntity);
    }

    @Override
    public List<ParkingBean> parkingList(int pageSize, int start, String type, String status, String residenceId, String parkId) {
        return parkingMapper.parkingList(pageSize,start,type,status,residenceId,parkId);
    }

    @Override
    public int parkingSize(int pageSize, int start, String type, String status, String residenceId, String parkId) {
        return parkingMapper.parkingSize(pageSize,start,type,status,residenceId,parkId);
    }

}
